import request from '@/utils/request'

export function add(data) {
  if (data.id) {
    delete data.id
  }
  return request({
    url: 'api/supplier/add',
    method: 'post',
    data
  })
}

export function edit(data) {
  return request({
    url: 'api/supplier/update',
    method: 'post',
    data
  })
}

export default { add, edit }
